<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Config extends Model
{
    protected $guarded = ['id'];

    public static $rules = [
        'name' => 'required',
        'res_id' => 'required',
    ];

    public $casts = [
        'check' => 'boolean',
        'rate' => 'boolean'
    ];


    public function ads(){
        switch($this->ads_type){
            case 0:
                return "Admob";
            case 1:
                return "百度";
        }
    }
}
